<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://xmlns.jcp.org/jsf/html"
        xmlns:cc="http://xmlns.jcp.org/jsf/composite"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
        xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">

<cc:interface>
    <cc:attribute name="styleClass" default="box"/>
    <cc:attribute name="style" required="false"/>
    <cc:attribute name="headerClass" default="box-header"/>
    <cc:facet name="header" required="false"/>
</cc:interface>

<cc:implementation>
    <h:outputStylesheet library="mygourmet" name="components.css"/>
    <div class="#{cc.attrs.styleClass}" style="#{cc.attrs.style}">
        <c:if test="#{!empty cc.facets.header}">
            <p class="#{cc.attrs.headerClass}">
                <cc:renderFacet name="header"/>
            </p>
        </c:if>
        <cc:insertChildren/>
    </div>
</cc:implementation>

</ui:composition>
